Problem Note 30562: SCL SORT function fails when specifying more than one SAS Data Set option on the OUT= option
If you use the SORT function in SAS Component Language to sort a table to an output table by specifying the OUT= option and you specify more than one SAS data set option as in the following example,
rc=sort(dsid, 'age', '/out=myLib.sorted(label="xyz" drop=weight)');
the function might fail with a non-zero return code such as 219 or 253. If you use the SYSMSG function to query the associated system message for these return codes, the messages are the following respectively:
Invalid SORT option DROP WEIGHT)
Output data set for SORT cannot be opened.
To circumvent this problem, either specify just one of the SAS data set options in the SORT function or specify both options in a PROC SORT step within a SUBMIT block. Another alternative is to first sort the data to a temporary data set and then use the COPY function to create the permanent data set specifying all the SAS data set options. For example,
rc=sort(dsid, 'age', '/out=tempsort);
rc=copy('work.tempsort', 'myLib.sorted(label="xyz" drop=weight)');
|
Operating System and Release Information
SAS System | SAS/AF | z/OS | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft® Windows® for x64 | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.3 TS1M0 |
Windows Vista | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.3 TS1M0 |
HP-UX IPF | 9.1 TS1M3 | 9.3 TS1M0 |
Linux | 9.1 TS1M3 | 9.3 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 | 9.3 TS1M0 |
Solaris for x64 | 9.1 TS1M3 | 9.3 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Topic: | Common Programming Tasks ==> Sorting Data SAS Reference ==> SCL (SAS Component Language)
|
Date Modified: | 2007-11-21 11:07:48 |
Date Created: | 2007-11-14 16:51:14 |